1. Field of the Invention
The present invention relates to a packet classifier for a network and the method thereof, and more particularly to a packet classifier for a network having an extensible and configurable classification mechanism and a practical structure and a method thereof.
2. Description of Related Art
A network based on the Internet Protocol (IP) has a number of network mechanisms that need to classify network packets. Network gateway devices use network packet classifiers to perform specific location operations on packets received from the network to calculate header locations or field locations of the packets. The network packet classifier inspects the contents of specific headers and fields of the packets, and, according to a previously established set of rules, data matching operation is performed and the packets are classified. The network packet classifier determines the method of processing each type of packets, and according to the result of the classification, controls or manages the packets, or provides specific network resources.
With the rapid increase in network services and the rapid progress in networking technologies, the conventional network mechanism needs to be modified. Because the conventional hardware of a packet classifier, which is designed according to existing network protocol standards, is rather fixed, this has a definite impact on the devices for processing network packets. Facing newly added or revised network protocols, it is difficult to modify the conventional hardware in order to readily process new and unfamiliar field locations. For this problem, the industry generally resorts to re-designing a new hardware so that the new field locations can be defined. The conventional hardware structure only allows classification based on fixed fields and provides neither flexible classification mechanism nor extensibility in packet processing. Furthermore, no dynamic adjusting mechanism is provided to respond to new packet fields. Therefore, newly added network protocols or packet types are not supported.